package org.yh.springboot.thread;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;


/**
 * @author 404
 *
 */
@Service
public class AsyncTaskService {
	@Async
	public void executeAsyncTask(int i) {
		System.out.println("线程" + Thread.currentThread().getName() + " 执行异步任务：" + i);

	}


    @Async
    public void executeAsyncTaskPlus(Integer i) {
        System.out.println("执行异步任务+1: " + (i + 1));
    }
}
